﻿/* 2014/1/12 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cosmos.IO.FileSystemOperation
{
    public class FileOperationRecord
    {
        public static FileOperationRecord CreateMoveRecord(string sourcePath, string targetPath)
        {
            return new FileOperationRecord(FileOperationType.Move, sourcePath, targetPath);
        }

        public static FileOperationRecord CreateCopyRecord(string sourcePath, string targetPath)
        {
            return new FileOperationRecord(FileOperationType.Copy, sourcePath, targetPath);
        }

        public static FileOperationRecord CreateDeleteRecord(string path)
        {
            return new FileOperationRecord(FileOperationType.Delete, path, null);
        }

        public FileOperationRecord(FileOperationType type, string sourcePath, string targetPath)
        {
            Type = type;
            SourcePath = sourcePath;
            TargetPath = targetPath;
        }

        public FileOperationType Type
        {
            get;
            set;
        }

        public string SourcePath
        {
            get;
            set;
        }

        public string TargetPath
        {
            get;
            set;
        }
    }
}
